package com.play.trading_test.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(
        consumerGroup = "TEST_TOPIC",
        topic = "TEST_TOPIC",
        messageModel = MessageModel.CLUSTERING
)
public class LoginLogConsumer implements RocketMQListener<String> {


    @Override
    public void onMessage(String s) {

        log.info("收到消息: {}", s);


    }


}
